//
//  NewsOneTableViewCell.m
//  WangYi
//
//  Created by dllo on 15/11/12.
//  Copyright © 2015年 0. All rights reserved.
//

#import "NewsOneTableViewCell.h"
#import "DaoHangModel.h"
@implementation NewsOneTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatSubViews];
    }
    
    return self;
}

-(void)creatSubViews{
    
    self.headImageView = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH*5, HEIGHT*20, WIDTH*365,HEIGHT* 150)];
    self.headImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.headImageView];
    
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH*5, HEIGHT*0, WIDTH*330, HEIGHT*20)];
    self.titleLabel.font = [UIFont systemFontOfSize:HEIGHT*19];
    //    self.titleLabel.backgroundColor = [UIColor grayColor];
    self.titleLabel.numberOfLines = 0;
    [self.contentView addSubview:self.titleLabel];
    
    self.numberLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH*300, 0, WIDTH*75, HEIGHT*20)];
    [self.contentView addSubview:self.numberLabel];
    self.numberLabel.font = [UIFont systemFontOfSize:HEIGHT*16];
    self.numberLabel.textColor = [UIColor blueColor];

 

}

-(void)setModel:(DaoHangModel *)model{
    
    _model = model;
    
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.imgsrc] placeholderImage:[UIImage imageNamed:@"zhanwei.png"]];
    self.titleLabel.text = model.title;
    self.numberLabel.text = model.TAG;
    
}



@end
